package xyz.eden.gateway.shenyu.admin;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;

import java.util.Arrays;
import java.util.Optional;

@Slf4j
@SpringBootApplication
@ComponentScan(basePackages = {"org.apache.shenyu.admin"})
public class AdminApplication {
    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(AdminApplication.class, args);
        String[] beanDefinitionNames = context.getBeanDefinitionNames();
        Arrays.stream(Optional.of(beanDefinitionNames).orElse(new String[]{})).forEach(beanName -> {
            log.info("BeanName: [{}].", beanName);
        });
    }
}
